package com.zyg.cod.test;

import com.zyg.cod.annotation.CommenElement;
import com.zyg.cod.annotation.FieldXmlAnnotation;
import com.zyg.cod.annotation.SubNodeAnnotation;
import com.zyg.cod.annotation.TableXmlAnnotation;

import java.util.Date;

/**
 * @Dsc: 社会关系信息 1 - *
 * @Author: zyg
 * @Date: 2021/1/26
 */
@TableXmlAnnotation(TableName = "relationInfo", RelationType = 2, ElementFromName = "RelationInfo")
public class RelationInfo {

	//@SubNodeAnnotation(ElementName = "SubNode")
	@FieldXmlAnnotation(FieldName = "ID", ElementName = "SubNode", isNeed = false)
	private int id;

	@CommenElement(ElementName = "update")
	@FieldXmlAnnotation(FieldName = "update", ElementName = "Update", isNeed = true)
	private Date update;
	@FieldXmlAnnotation(FieldName = "uid", ElementName = "Uid", isNeed = true)
	private int uid;
	@FieldXmlAnnotation(FieldName = "userName", ElementName = "UserName", isNeed = true)
	private String userName;

	//
	@SubNodeAnnotation(ElementName = "Relation")
	@FieldXmlAnnotation(FieldName = "relation", ElementName = "Relation", isNeed = true)
	private String relation;


	public RelationInfo() {
	}

	public RelationInfo(int id, Date update, int uid, String userName, String relation) {
		this.id = id;
		this.update = update;
		this.uid = uid;
		this.userName = userName;
		this.relation = relation;
	}

	public Date getUpdate() {
		return update;
	}

	public void setUpdate(Date update) {
		this.update = update;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getUid() {
		return uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getRelation() {
		return relation;
	}

	public void setRelation(String relation) {
		this.relation = relation;
	}
}
